import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_ns_ble/flutter_ns_ble.dart';
import 'package:flutter_ns_ble/flutter_ns_ble_platform_interface.dart';
import 'package:flutter_ns_ble/flutter_ns_ble_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockFlutterNsBlePlatform
    with MockPlatformInterfaceMixin
    implements FlutterNsBlePlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final FlutterNsBlePlatform initialPlatform = FlutterNsBlePlatform.instance;

  test('$MethodChannelFlutterNsBle is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelFlutterNsBle>());
  });

  test('getPlatformVersion', () async {
    FlutterNsBle flutterNsBlePlugin = FlutterNsBle();
    MockFlutterNsBlePlatform fakePlatform = MockFlutterNsBlePlatform();
    FlutterNsBlePlatform.instance = fakePlatform;

    expect(await flutterNsBlePlugin.getPlatformVersion(), '42');
  });
}
